<?php
// The Query
$args = array( 'post_type' => 'featuredpost' , 'posts_per_page' => '-1');
$the_query = new WP_Query( $args );

// The Loop
$c = 0;
while ( $the_query->have_posts() ) : $the_query->the_post(); 

?>
	<div class="footer_box3 <?=($c++%2==1) ? 'right' : 'left' ?>">
		<a href="<?php echo cc_decide_link($post->ID); ?>" target="<?php echo cc_get_link_target($post->ID);?>">
			<?php 
				if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
				  echo get_the_post_thumbnail($post->ID, 'full' );
				} 
			?>
		</a>
	</div>
<?php
endwhile;
// Reset Post Data
wp_reset_postdata();
?>
